package com.dbsop.domain.rest.info;

import com.dbsop.common.enums.AggResultFlag;
import org.elasticsearch.search.aggregations.Aggregation;

import java.util.List;

/**
 * 解析值
 */
public class RestAggResult {

    private AggResultFlag flag;

    private String name;

    private Object value;

    private List<Aggregation> aggregations;

    public RestAggResult(AggResultFlag flag, String name, Object value) {
        this.flag = flag;
        this.name = name;
        this.value = value;
    }


    public RestAggResult(AggResultFlag flag, String name, Object value, List<Aggregation> aggregations) {
        this.flag = flag;
        this.name = name;
        this.value = value;
        this.aggregations = aggregations;
    }

    public List<Aggregation> getAggregations() {
        return aggregations;
    }

    public void setAggregations(List<Aggregation> aggregations) {
        this.aggregations = aggregations;
    }

    public AggResultFlag getFlag() {
        return flag;
    }

    public void setFlag(AggResultFlag flag) {
        this.flag = flag;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Object getValue() {
        return value;
    }

    public void setValue(Object value) {
        this.value = value;
    }



}
